home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 11 / Mac Magazin and MacEasy Magazine CD - Issue 11.iso / Sharewarebibliothek / Entwickler / ThreadLibrary-1.0 / Documentation / Version History < prev   
Text File  |  1995-06-08  |  15KB  |  389 lines

  1. Version History
  2. ---------------
  3.  
  4. * 1.0 950608 (public distribution)
  5.  
  6.     - What I thought was a bug under UniFinder was not a bug in Thread
  7.     Library, but probably an incorrect startup disk or an error in
  8.     the build script. When I rebuilt the library, and started up with
  9.     a copy of System 6.0.5 on my hard disk, Thread Library ran fine on
  10.     my Macintosh Plus running System 6.0.5 with both UniFinder and
  11.     MultiFinder.
  12.  
  13. * 1.0d4.8 950608 (limited distribution)
  14.  
  15.     - Wrapped headers in "extern C" so they can be used in C++ source code.
  16.  
  17.     - Tested TLM layer by using it in Apple's ThreadedSort example program.
  18.     It took very little time to convert to TLM and the PPC and 68K versions
  19.     ran perfectly.
  20.  
  21.     - Added macros to "ThreadLibraryManager.h" to simplify using the library
  22.     with Thread Manager.
  23.  
  24.     - Added more detailed information on adding TLM to an existing application.
  25.  
  26.     - Discovered that Thread Library does not work under UniFinder in System 6.0.5.
  27.  
  28. * 1.0d4.7 950531 (limited distribution)
  29.  
  30.     - Added PowerPC shared libraries "ThreadLibrary-PPC.lib" and 
  31.     "ThreadLibrary-PPC-Dbg.lib".
  32.  
  33.     - Added note about using WaitNextEvent.
  34.  
  35.     - Removed "Stop" buttons from demo dialogs.
  36.  
  37. * 1.0d4.6 950513 (limited distribution)
  38.  
  39.     - Added ThreadLibraryManager interface.
  40.  
  41.     - Added AppleScript to automate build procedure.
  42.  
  43.     - Improved test application (can now display multiple windows).
  44.  
  45.     - Put back the function ThreadStackFrame.
  46.  
  47.     - Removed special VBL task due to spurious breaks into the debugger
  48.     caused by the stack sniffer VBL task and the sentinel value placed
  49.     at the end of a thread's stack.
  50.     
  51.     - Added missing check to exclude disabled threads from calculation
  52.     of yield interval in ThreadYieldInterval.
  53.     
  54.     - Added memory allocation callbacks.
  55.     
  56.     - Expanded, formatted, and generally improved documentation.
  57.     
  58.     - Added ThreadStackSize function.
  59.  
  60.     - Made native PowerPC version.
  61.  
  62.     - Removed ThreadSaveFPU and ThreadSaveFPUSet.
  63.     
  64. * 1.0d4.5 941212 (limited distribution)
  65.  
  66. In brief, version 1.0d4.5:
  67.  
  68.     - Fixes an error in v1.0d4.4 in the call to the suspend
  69.     callback function.
  70.     
  71.     - Changes the existing functional specification that may
  72.     affect applications that installed a suspend callback
  73.     function; applications that did not install a suspend
  74.     callback function will not be affected by this change.
  75.  
  76.     - Adds definitions for macros and functions that may
  77.     be used to stub out calls to Thread Library.
  78.     
  79.     - Several callback functions were added to provide
  80.     greater control to an application using Thread Library.
  81.     
  82.     - Error codes are stored with each thread.
  83.     
  84.     - Changed return value for ThreadCount from 'short' to 'long'.
  85.     
  86.     - Removed the function ThreadStackFrame and the typedef for
  87.     ThreadStackFrameType.
  88.  
  89.     - Saves floating pointer registers if there is a floating point
  90.     unit.
  91.     
  92.     - Separated register saving and restoring code to simplify port to
  93.     native PowerPC version.
  94.     
  95.     - Removed most compiler dependencies.
  96.     
  97.     - Added functions for enabling and disabling a thread.
  98.     
  99. In greater detail, these changes are:
  100.  
  101. - The suspend procedure for a thread was being passed the
  102. data parameter for the thread being resumed, instead of
  103. the data parameter for the thread being suspended.
  104.  
  105. - I've added a couple of files, "ThreadStubsLib.c"
  106. and "ThreadStubLib.h". You can use these files
  107. to stub out the calls to Thread Library. See
  108. the comment in ThreadStubLib.h for more details.
  109.  
  110. - Two new callback functions, called "begin" and "end",
  111. have been added. These functions are called before a
  112. thread is first executed and before a thread is disposed
  113. of, respectively. Functions for getting and setting
  114. all of the callback functions have been added to
  115. the interface to Thread Library.
  116.  
  117. - The sequence of calls, over the lifetime of a thread,
  118. of the callback functions installed by the application
  119. has been defined more precisely. There is some redundancy
  120. in the new sequence, but it is symmetrical and is nearly
  121. fully compatible with prior versions of Thread Library.
  122. The new sequence of calls is:
  123.  
  124.     ( begin, resume, entry ( suspend, resume ) x Ntimes, suspend, end
  125.  
  126. This new sequence is described in greater detail in the documentation.
  127.  
  128. The old sequence was:
  129.  
  130.     resume, entry ( suspend, resume ) x Ntimes
  131.  
  132. This old sequence had an assymetry, which meant that the resume
  133. function could be called one more time than the suspend function.
  134. The new sequence ensures that the suspend function is called
  135. the exact same number of times as the resume function.
  136.  
  137. For existing applications that installed a suspend function, you
  138. will have to verify that the suspend function can be called even
  139. after the entry point has returned, and that your application does
  140. not otherwise rely on this assymetric behavior of Thread Library.
  141.  
  142. - The error code from the last call to a Thread Library function
  143. is stored with the thread that was active at the time of the
  144. call. In addition, a global error variable is used if there
  145. are no threads in existence (including the main thread)
  146. at the time of the call to Thread Library. This should not
  147. affect any existing applications, but was done as an
  148. internal enhancement to support preemptive threads (if
  149. I ever add preemptive thread support).
  150.  
  151. - Most of the compiler dependencies have been removed. Thread Library
  152. has been successfully compiled using THINK C 7.0.3, MPW 3.3.1, and
  153. CodeWarrior DR4.
  154.  
  155. - Two functions, ThreadEnabled and ThreadEnabledSet, allow you
  156. to determine whether a thread is enabled and to enable or disable
  157. a thread. Only enabled threads are scheduled for execution. The
  158. main thread cannot be disabled.
  159.  
  160. * 1.0d4.4 940907 (limited distribution)
  161.  
  162. Version 1.0d4.4 adds the function ThreadEndAll. From the README
  163. file:
  164.  
  165. ThreadEndAll disposes of all threads, including the main thread.
  166. ThreadEndAll is useful when your application is terminating and
  167. you want to dispose of any threads that may still exist.
  168. ThreadEndAll can be called only from within the main thread.
  169.  
  170. * 1.0d4.3 940715 (limited distribution)
  171.  
  172. Version 1.0d4.3 fixes a problem with compiling with Apple's old
  173. (non-universal) headers. I'd just forgotten to put in an ifdef
  174. around the VBLUPP stuff.
  175.  
  176. * 1.0d4.2 940706 (limited distribution)
  177.  
  178. Version 1.0d4.2 fixes one bug, adds a few optimizations, and slightly
  179. alters the functional interface to Thread Library.
  180.  
  181. - Fixed error in detecting events that was introduced in 1.0d4.1.
  182.  
  183. - Fixed order of execution of actions taken when a thread
  184. is resumed (the stack sniffer was being resumed before
  185. the low-memory globals were restored)
  186.  
  187. - Removed the functions ThreadStatus and ThreadStatusSet, and the
  188. associated type definitions. The same functionality that was
  189. provided by these functions can be accomplished using the thread's
  190. data field, or using an application's global variables.
  191.  
  192. - Added support for the universal headers. If you need to recompile the
  193. demo applications, note that the calls to InitDialogs may cause a type
  194. error if you're using the old headers. Just change the parameter to
  195. InitDialogs from zero to NULL.
  196.  
  197. - Added ThreadErrorType and defined an error code.
  198.  
  199. * 1.0d4.1 940609 (limited distribution)
  200.  
  201. Version 1.0d4.1 fixes one bug. It does not alter the functional interface
  202. to Thread Library.
  203.  
  204. - ThreadSchedule and ThreadYield no longer call EventAvail to test for
  205. events. Instead, they look at low-memory globals and call CheckUpdate.
  206. This was necessary since calling EventAvail within a thread allowed
  207. the application to be switched out while the ApplLimit, HeapEnd, and
  208. CurStackBase low-memory globals were set to non-standard values. This
  209. didn't cause any major problems, but Barry Kirsch noticed that the
  210. Finder's About window would display an incorrect value for the
  211. application, as if the application had used its entire memory partition.
  212. Removing the call to EventAvail solved this problem.
  213.  
  214. * 1.0d4 940316 (public distribution)
  215.  
  216. Version 1.0d4 of Thread Library is primarily a bug-fix release. The
  217. functional interface has not changed since v1.0d2.2.
  218.  
  219. - Writing the sentinel value in v1.0d3 introduced a bug that corrupted
  220. the application's heap. This was caused by writing the sentinel value
  221. to the application's main stack at the location pointed to by ApplLimit.
  222. Apparently, there are some important data about the heap at that location,
  223. and overwriting them caused the heap to become corrupted. This was the
  224. most serious error yet in any released version of Thread Library and
  225. only slipped through because I didn't adequately test v1.0d3. The sentinel
  226. value is still written to the stacks of threads other than the main
  227. thread. I spent more time testing the current release, and it seems to
  228. work ok.
  229.  
  230. - The ThreadsTest application had some errors in the way it handled
  231. events in its simple event loop. This could have resulted in errors
  232. handling mouse clicks and in handling update events. The current
  233. version should fix those problems.
  234.  
  235. - The variables gThread and gThreadStackSniffer, defined in the file
  236. "ThreadLib.c", were declared with global scope, and could have
  237. conflicted with other variables in an application. These variables are
  238. now declared with static scope to eliminate such conflicts.
  239.  
  240. - Made the type ThreadSNType a synonym for the type ThreadType.
  241. Applications should refer to threads using variables of type
  242. ThreadType. The type ThreadSNType is included for compatability
  243. with versions 1.0d2.2 through 1.0d3. New applications should no
  244. longer use the type ThreadSNType.
  245.  
  246. - Increased the running time of tests in the ThreadsTest application
  247. from 30 seconds to 45 seconds. The time remaining to each test is
  248. now displayed in seconds rather than in ticks.
  249.  
  250. - The ThreadsTest application includes code to enable heap checking
  251. and discipline in TMON or MacsBug. To enable the code, you need to
  252. define DEBUGGER_CHECKS as 1 in the file "ThreadsTest.c".
  253.  
  254. * 1.0d3 940301 (limited public distribution, only posted to the
  255. Boston Computer Society's Mac BBS)
  256.  
  257. - A sentinel value is written to the bottom of the stack to help the stack
  258. sniffer VBL task catch stack overrun.
  259.  
  260. - The ThreadsTest application uses WaitNextEvent if it's available.
  261.  
  262. - Made some minor changes to the code, updated some of the documentation and
  263. the terms of use, and updated the results for the ThreadTimed application.
  264.  
  265. - Did some minor editing to the "Distribution" document so that I could
  266. use it for other free utilities I've released.
  267.  
  268. * 1.0d2.2 940225 (limited distribution)
  269.  
  270. - Added ifdef around the defines for the macros for accessing low-memory
  271. globals so that the code can be compiled using either "SysEqu.h" or
  272. THINK C's "LoMem.h".
  273.  
  274. * 1.0d2.2 940222 (limited distribution)
  275.  
  276. - All threads are referred to using thread serial numbers instead of thread
  277. pointers. This makes the functional interface more robust without affecting
  278. the speed of calls to ThreadYield and the other context switching routines.
  279. Most type definitions were made private and removed from the interface file
  280. "ThreadLib.h".
  281.  
  282. - Added the functions ThreadSleepSet, ThreadData, ThreadDataSet.
  283.  
  284. - Threads are stored in a doubly-linked circular queue of threads.
  285.  
  286. - When a thread is activated it is moved to the end of the queue of threads,
  287. so that the round-robbin scheduling is fairer (since the main thread has the
  288. highest priority).
  289.  
  290. - Fixed the problem encountered by some users that prevented the ThreadsTest
  291. application from updating the counters. Certain low-memory globals are saved
  292. and restored on context switches (these are the same low-memory globals that
  293. Thread Manager saves and restores). This fixes the update problem, which I
  294. suspect was due to some routines in QuickDraw making certain undocumented
  295. assumptions about the location of the stack relative to the location of heap.
  296.  
  297. * 1.0d2.1 940218 (limited distribution)
  298.  
  299. This release is intended primarily to help catch an update problem in the
  300. ThreadsTest application.
  301.  
  302. - The ThreadsTest application now runs first using Thread Manager, then using
  303. Thread Library. Added a "Stop" button to skip a test.
  304.  
  305. - Put back the code to save and restore certain low-memory globals during
  306. context switches in "ThreadLib.c"
  307.  
  308. - Minor improvements to error reporting: "ThreadLib.c" will display a simple
  309. string in the debugger if an assertion fails; "ThreadTimed.c" will display
  310. errors using printf instead of DebugStr.
  311.  
  312. - Minor additions to the documentation and to the description of the
  313. functional interface.
  314.  
  315. - Removed the compiled libraries; anyway they probably wouldn't work with
  316. THINK C 6.0 or MPW and it's too much work to try to keep them synchronized
  317. every time I modify the code (I need a scriptable interface).
  318.  
  319. - Added "reserved" field to the ThreadType structure (this is a private
  320. field reserved for future use).
  321.  
  322. - To reduce the possibility of conflict with user-defined types,
  323. uses ThreadLinkType instead of LLType, ThreadTicksType instead
  324. of TicksType, THREAD_TICKS_MAX instead of TICKS_MAX, and
  325. THREAD_TICKS_SEC instead of TICKS_SEC. Now every type and function
  326. defined in "ThreadLib.h" is preceded with the prefix "Thread", and
  327. every constant is preceded with the prefix "THREAD_".
  328.  
  329. - "ThreadLib.c" includes actual header files instead of using THINK C's
  330. non-standard MacHeaders. This was done primarily so I could use
  331. "SysEqu.h" instead of "LoMem.h", but it will also make porting to
  332. another compiler easier.
  333.  
  334. - Added THREAD_DEBUG so thread debug code can be selectively disabled
  335. without defining NDEBUG and surrounded debug functions with conditional
  336. compile directives to reduce dead-code size in non-debug version.
  337.                          
  338. * 1.0d2 940217 (public distribution)
  339.  
  340. - Added thread serial number field, and the functions ThreadSN and
  341. ThreadFromSN to access the field. Each thread is assigned a unique
  342. serial number to avoid the possibility of disposing of a thread
  343. more than once.
  344.  
  345. - Fixed problem with the "defer and combine stack adjusts" option
  346. to the THINK C optimizer.
  347.  
  348. - Added a stack sniffer VBL task to help detect stack overflow.
  349.  
  350. - Added the functions ThreadStackMinimum and ThreadStackDefault for
  351. determining the minimum and the default stack sizes for threads and
  352. removed the constant THREAD_STACK_SIZE.
  353.  
  354. - Added ThreadTimed test application.
  355.  
  356. - Improved documentation.
  357.  
  358. - For efficiency, defined TickCount as Ticks low-memory global, and made a
  359. few other changes.
  360.  
  361. - For greater ease in adding ThreadLib to other people's applications,
  362. removed use of exceptions. This also increases the efficiency of context
  363. switches in applications that don't use exceptions.
  364.  
  365. - ThreadLib.c now compiles into under 2K (instead of 4.5K) when all debug
  366. code is disabled and all optimizations are enabled.
  367.  
  368. - Removed THREAD_SAVE_GLOBALS code since it didn't seem to be needed.
  369.  
  370. - Added compiled debug and optimized libraries.
  371.  
  372. * 1.0.d1.1 (limited distribution)
  373.  
  374. - Threads are allocated as pointers instead of handles, making them more
  375. efficient.
  376.  
  377. - Fixed a possible bug in the way ThreadSchedule called EventAvail.
  378.  
  379. - Added status field to threads and ThreadStatus/ThreadStatusSet functions
  380. to get and set the value of the field.
  381.  
  382. - The test application uses a modeless dialog so it can be put into the
  383. background, the size flags were set so the system won't complain on 32-bit
  384. systems, and it will display an alert if there's an error.
  385.  
  386. * 1.0d1 940211 (public distribution)
  387.  
  388. First release.
  389.